package com.qf.mvc2203.servlet;


import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/aj")
public class AjaxServlet extends HttpServlet {
    @Override
    protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        final String fname = req.getParameter("fname");

        final String lname = req.getParameter("lname");

        System.out.println(fname);
        System.out.println(lname);

        resp.getWriter().println("hello "+fname+" "+lname);
    }
}
